﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MLRobotic.Asserv;

namespace MLRobotic.Simulateur._2013.Tools
{
    public class ComPort
    {

        public void SendPosition(IA.Drivers.COM.typePacket type)
        {
            //Log.Write("COM : Send position (" + Deplace.Xposmm.ToString("0") + ", " + Deplace.Yposmm.ToString("0") + ", " + Deplace.TetaPos.ToString("0.00") + ")");

            if (frm_SimuBack.Complugged)
                frm_SimuBack.UART.Send((short)Deplace.Xposmm, (short)Deplace.Yposmm, (short)(Deplace.TetaPos * 1000), type);

        }
        public void Send(IA.Drivers.COM.typePacket type)
        {
            //Log.Write("COM :" + DateTime.Now.Second + "," + DateTime.Now.Millisecond + " : Send(" + type.ToString() + ")");

            if (frm_SimuBack.Complugged)
                frm_SimuBack.UART.Send(type);

        }
    }
}
